﻿<!--订单列表页面-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<!-- 包含公共的JSP代码片段 -->
<title>锐颜酒家后台管理平台</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/detail/style/js/jquery.js"></script>
<script type="text/javascript" src="/detail/style/js/page_common.js"></script>
	<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<link href="/detail/style/css/common_style_blue.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="/detail/style/css/index_1.css" />
	<script type="text/javascript">
		/**
		 * 查看当前订单的详情
		 * @param oid 订单的编号
		 */
		function orderDetail(oid)
		{
			location.href = '/orderDetail/' + oid;
		}

		/**
		 * 支付订单
		 * @param deskID 餐桌的主键
		 * @param Oid 订单的主键
		 */
		function pay(deskID, Oid)
		{
			location.href = '/pay/' + deskID + '/' + Oid;
		}popo[poipoiuoiuyiuytuytrytrewtrwer]
	</script>
</head>
<body>
	<!-- 页面标题 -->
	<div id="TitleArea">
		<div id="TitleArea_Head"></div>
		<div id="TitleArea_Title">
			<div id="TitleArea_Title_Content">
				<img border="0" width="13" height="13" src="/detail/style/images/title_arrow.gif" /> 餐厅订单列表
			</div>
		</div>
		<div id="TitleArea_End"></div>
	</div>

	<!-- 主内容区域（数据列表或表单显示） -->
	<div id="MainArea">
		<table class="MainArea_Content" align="center" cellspacing="0" cellpadding="0">
			<!-- 表头-->
			<thead>
				<tr align="center" valign="middle" id="TableTitle">
					<td>订单编号</td>
					<td>餐桌名</td>
					<td>下单日期</td>
					<td>总金额</td>
					<td>状态</td>
					<td>操作</td>
				</tr>
			</thead>
			<!--显示数据列表 -->
			<tbody id="TableData">
				<tr height="60" th:each="order: ${orders}">
					<td align="center" th:text="${order.oid}"></td>
					<td align="center" th:text="${order.desk.name}"></td>
					<td align="center" th:text="${order.order_time}"></td>
					<td align="center" th:text="${order.totalFee}"></td>
					<td align="center" th:text="${order.state} == 0 ? '未结账' : '结账'"></td>
					<td>
						<a href="javascript:void(0);" th:onclick="|orderDetail(${order.oid})|" class="FunctionButton">详细</a>
						<a href="javascript:void(0);" th:onclick="|pay(${order.desk.id}, ${order.oid})|" class="FunctionButton">结账</a>
					</td>
				</tr>
			</tbody>
		</table>
		<!-- 其他功能超链接 -->
		<div id="TableTail" align="center">
		</div>
	</div>
</body>
</html>
